﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pangeo.Admin.Models
{
    /// <summary>
    /// 返回结果
    /// </summary>
    public class Result
    {
        /// <summary>
        /// 是否成功（默认false）
        /// </summary>
        public bool Success { get; set; }

        /// <summary>
        /// 返回消息
        /// </summary>
        public string? Message { get; set; }

        /// <summary>
        /// 返回结果
        /// </summary>
        public string? Data { get; set; }
    }

    /// <summary>
    /// 返回结果（Token）
    /// </summary>
    public class TokenResult : Result
    {
        /// <summary>
        /// 令牌
        /// </summary>
        public string? Token { get; set; }

        /// <summary>
        /// 令牌失效时间
        /// </summary>
        public string? ExpireTime { get; set; }
    }

    /// <summary>
    /// 返回结果（T）
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class Result<T> : Result
    {
        public new T? Data { get; set; }
    }
}
